﻿@{
    ViewBag.Title = "电表数据采集数据";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section scripts{
        <script src="~/Areas/Pacm/ViewModels/Pacm.com.js"></script>
        <script src="~/Areas/Pacm/ViewModels/Pacm.viewModel.search.js"></script>
        <script type="text/javascript">
            var data = @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model));
            var viewModel = function(){ 
                Pacm.viewModel.search.apply(this,arguments);
            };
            ko.bindingViewModel(new viewModel(data));
        </script>
}
        <div class="z-toolbar">
            <a id="a_refresh" href="#" plain="true" class="easyui-linkbutton" icon="icon-arrow_refresh" title="刷新" data-bind="click:refreshClick">刷新</a>
            <a id="a_export" href="#" class="easyui-splitbutton" data-options="menu:'#dropdown',iconCls:'icon-download'">导出</a>
        </div>

        <div id="dropdown" style="width:100px; display:none;">  
            <div data-options="iconCls:'icon-ext-xls'"      suffix="xls"    data-bind="click:downloadClick">Excel2003   </div>  
            <div data-options="iconCls:'icon-page_excel'"   suffix="xlsx"   data-bind="click:downloadClick">Excel2007   </div>  
            <div data-options="iconCls:'icon-ext-doc'"      suffix="doc"    data-bind="click:downloadClick">Word2003    </div>  
        </div> 

        <div id="condition" class="container_12" style="position:relative;">
            <div class="grid_1 lbl">电表名称</div>
            <div class="grid_5 val"><input type="text" style="width:405px" data-bind="datasource:dataSource.dbzdItems ,comboboxValue:form.Counter名称" class="z-txt easyui-combobox" data-options="showblank:true"/></div>
            <div class="clear"></div>
            <div class="grid_1 lbl">查询年度</div>
            <div class="grid_2 val"><input type="text" data-bind="datasource:dataSource.yearItems ,comboboxValue:form.年度" class="z-txt easyui-combobox" data-options="showblank:true"/></div>
            <div class="grid_1 lbl">查询月份</div>
            <div class="grid_2 val"><input type="text" data-bind="datasource:dataSource.monthItems ,comboboxValue:form.月份" class="z-txt easyui-combobox" data-options="showblank:true"/></div>
            <div class="grid_1 lbl">查询日</div>
            <div class="grid_2 val"><input type="text" data-bind="datasource:dataSource.dayItesm ,comboboxValue:form.日" class="z-txt easyui-combobox" data-options="showblank:true"/></div>

            <div class="clear"></div>
            <div class="prefix_9" style="position:absolute;top:5px;height:0;">  
                <a id="a_search" href="#" class="button button-blue" style="margin:0 15px;" data-bind="click:searchClick">查询</a> 
                <a id="a_reset" href="#" class="button button-blue" data-bind="click:clearClick">清空</a>
            </div>
        </div>

        <table id="gridlist" data-bind="datagrid:grid">
             <thead data-options="frozen:true">
                    <tr>
                        <th field="Rq" sortable="false" align="center"      width="80">日期</th>  
                        <th field="Counter名称" sortable="false" align="left"  width="350">电表名称</th>
                    </tr>
              </thead>
            <thead>  
            <tr>  
                <th field="实时值_00" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_00</th>
                <th field="实时值_01" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_01</th>
                <th field="实时值_02" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_02</th>
                <th field="实时值_03" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_03</th>
                <th field="实时值_04" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_04</th>
                <th field="实时值_05" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_05</th>
                <th field="实时值_06" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_06</th>
                <th field="实时值_07" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_07</th>
                <th field="实时值_08" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_08</th>
                <th field="实时值_09" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_09</th>
                <th field="实时值_10" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_10</th>
                <th field="实时值_11" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_11</th>
                <th field="实时值_12" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_12</th>
                <th field="实时值_13" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_13</th>
                <th field="实时值_14" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_14</th>
                <th field="实时值_15" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_15</th>
                <th field="实时值_16" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_16</th>
                <th field="实时值_17" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_17</th>
                <th field="实时值_18" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_18</th>
                <th field="实时值_19" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_19</th>
                <th field="实时值_20" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_20</th>
                <th field="实时值_21" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_21</th>
                <th field="实时值_22" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_22</th>
                <th field="实时值_23" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_23</th>
                <th field="实时值_24" sortable="false" align="right"  formatter="com.formatMoney"  width="90">实时值_24</th>
                <th field="时段1_峰峰" sortable="false" align="right" formatter="com.formatMoney"  width="90">时段1_峰峰</th>
                <th field="时段2_峰" sortable="false" align="right"   formatter="com.formatMoney"  width="90">实时值_00</th>  
                <th field="时段3_平" sortable="false" align="right"   formatter="com.formatMoney"  width="90">时段3_平</th>  
                <th field="时段4_谷" sortable="false" align="right"    formatter="com.formatMoney"   width="90">时段4_谷</th>  
                <th field="时段5_谷谷" sortable="false" align="right"  formatter="com.formatMoney"   width="90">时段5_谷谷</th>  
                <th field="CreateDate" sortable="false" align="center" formatter="com.formatDate"     width="100">采集时间</th>  
                <th field="UpdateDate" sortable="false" align="center" formatter="com.formatDate"     width="100">更新时间</th>  
            </tr>                            
            </thead>   
        </table> 

